package com.hsteach.service.equipment;

import com.hsteach.common.utils.DateUtils;
import com.hsteach.dao.domain.equipment.EquipmentRepair;
import com.hsteach.dao.mapper.equipment.EquipmentRepairMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 〈〉
 *
 * @author ext.qiufukang1
 * @create 2023/11/21
 * @since 1.0.0
 */
@Service
public class EquipmentSdkService {

    @Autowired
    private EquipmentRepairMapper equipmentRepairMapper;

    public Long sumRepair(String orgCode) {
        EquipmentRepair query = new EquipmentRepair();
        query.setOrgCode(orgCode);
        query.setGtCreateTime(DateUtils.getFirstDayOfMonth(DateUtils.getNowyyyyMMdd()));
        query.setLtCreateTime(DateUtils.getNextFirstDayOfMonth(DateUtils.getNowyyyyMMdd()));
        return equipmentRepairMapper.selectCount(query);
    }
}